﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eShop.Model
{
    public class CMS
    {
        public int CMSId { get; set; }
        public string CMSTitle { get; set; }
        public string CMSContent { get; set; }
        public CMSType CMSType { get; set; }
        public bool IsActive { get; set; }
        public bool IsDeleted { get; set; }

        public CMS(int CmsId, string CmsType, string CmsContent, bool isActive, bool isDeleted)
        {
            CMSId = CmsId;
            try
            {
                CMSType = (CMSType)Enum.Parse(typeof(CMSType), CmsType, true);
            }
            catch (Exception ex)
            {

            }
            CMSContent = CmsContent;
            IsActive = isActive;
            IsDeleted = isDeleted;
        }

        public CMS()
        {

        }
    }
}
